﻿using System;
using System.ComponentModel.Composition;
using System.Windows;
using MediaAssistant.Controls.Dialog;
using MediaAssistant.Helper;
using MefBasic;

namespace MediaAssistant.Controls.SmartDJPreferance
{
    [Export]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class SmartDJPreferancePresenter:APresenter<SmartDJPreferanceView>, IDialogContentPresenter
    {
        [ImportingConstructor]
        public SmartDJPreferancePresenter(SmartDJPreferanceView view) : base(view)
        {
        }

        #region Implementation of IDialogContentPresenter

        public bool OnClosing(DialogResult dialogResult)
        {
            return true;
        }

        public int GenrePreferance
        {
            get { return (int)GetValue(GenrePreferanceProperty); }
            set { SetValue(GenrePreferanceProperty, value); }
        }

        public static readonly DependencyProperty GenrePreferanceProperty =
            DependencyProperty.Register("GenrePreferance", typeof(int), typeof(SmartDJPreferancePresenter), new UIPropertyMetadata(RegistryHelper.GenrePreferance));



        public int AlbumPreferance
        {
            get { return (int)GetValue(AlbumPreferanceProperty); }
            set { SetValue(AlbumPreferanceProperty, value); }
        }

        public static readonly DependencyProperty AlbumPreferanceProperty =
            DependencyProperty.Register("AlbumPreferance", typeof(int), typeof(SmartDJPreferancePresenter), new UIPropertyMetadata(RegistryHelper.AlbumPreferance));



        public int ArtistPreferance
        {
            get { return (int)GetValue(ArtistPreferanceProperty); }
            set { SetValue(ArtistPreferanceProperty, value); }
        }

        public static readonly DependencyProperty ArtistPreferanceProperty =
            DependencyProperty.Register("ArtistPreferance", typeof(int), typeof(SmartDJPreferancePresenter), new UIPropertyMetadata(RegistryHelper.ArtistPreferance));




        public int ComposerPreferance
        {
            get { return (int)GetValue(ComposerPreferanceProperty); }
            set { SetValue(ComposerPreferanceProperty, value); }
        }

        public static readonly DependencyProperty ComposerPreferanceProperty =
            DependencyProperty.Register("ComposerPreferance", typeof(int), typeof(SmartDJPreferancePresenter), new UIPropertyMetadata(RegistryHelper.ComposerPreferance));


        #endregion
    }
}
